package com.bawei.product.controller;

import com.bawei.product.service.TestAsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {


    @Autowired
    TestAsyncService testAsyncService;
    @GetMapping("/test")
    public long test() {
        long startTime = System.currentTimeMillis();
        testAsyncService.thenRunAsync2();
        return System.currentTimeMillis()-startTime;
    }
}
